if [ "${grub_platform}" = "pc" ] -a [ -e /boot/memtest ]; then # Legacy 16-bit memtest menuentry "Memory Diagnostic Tool (memtest86+)" --hotkey=m { linux16 /boot/memtest } elif [ "${grub_platform}" = "pc" ] -a [ -e /boot/memtest.bin ]; then menuentry "Memory Diagnostic Tool (memtest86+)" --hotkey=m { linux /boot/memtest.bin } elif [ "${grub_platform}" = "efi" ] -a [ -e /boot/memtest.efi ]; then menuentry "Memory Diagnostic Tool (memtest86+)" --hotkey=m { linux /boot/memtest.efi } fi